<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('消毒记录列表')"/>
</head>
<body class="gray-bg">
<div class="container-div">
    <div class="row">
        <div class="col-sm-12 search-collapse">
            <form id="formId">
                <div class="select-list">
                    <ul>
                        <!--<li>
                            消毒位置：<input type="text" name="xdPlace"/>
                        </li>-->

                        <li>
                            消毒方式： <select name="xdType" required
                                          th:with="type=${@dict.getType('xiaoduType')}">
                            <option value="">所有</option>
                            <option th:each="dict : ${type}" th:text="${dict.dictLabel}"
                                    th:value="${dict.dictValue}"></option>

                        </select>
                        </li>

                        <li>
                            消毒内容：<input type="text" name="xdInfo"/>
                        </li>

                        <!--<li>
                            消毒人id：<input type="text" name="xdUser"/>
                        </li>

                        <li>
                            消毒人：<input type="text" name="xdUsername"/>
                        </li>

                        <li>
                            部门：<input type="text" name="xdDeptname"/>
                        </li>

                        <li>
                            班组：<input type="text" name="xdClassname"/>
                        </li>
-->

                        <li class="select-time">
                            <label>日期： </label>
                            <input type="text" class="time-input" id="startTime" placeholder="开始时间"
                                   name="params[beginxdTime]" lay-key="1">
                            <span>-</span>
                            <input type="text" class="time-input" id="endTime" placeholder="结束时间"
                                   name="params[endxdTime]" lay-key="2">
                        </li>


                        <!--<li>
                            创建时间：<input type="text" name="createTime"/>
                        </li>

                        <li>
                            创建者：<input type="text" name="createBy"/>
                        </li>

                        <li>
                            备注：<input type="text" name="remark"/>
                        </li>
-->
                        <li>
                            <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i
                                    class="fa fa-search"></i>&nbsp;搜索</a>
                            <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i
                                    class="fa fa-refresh"></i>&nbsp;重置</a>
                        </li>
                    </ul>
                </div>
            </form>
        </div>

        <div class="btn-group-sm" id="toolbar" role="group">

           <!-- <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:ncXiaoduLogs:export">
                <i class="fa fa-download"></i> 导出
            </a>-->
        </div>
        <div class="col-sm-12 select-table table-striped">
            <table id="bootstrap-table" data-mobile-responsive="true"></table>
        </div>
    </div>
</div>
<div th:include="include :: footer"></div>
<script th:src="@{/ruoyi/js/my-common-js.js}"></script>
<script th:inline="javascript">
    var prefix = ctx + "system/ncXiaoduLogs";

    $(function () {
        var options = {
            url: prefix + "/list",
            createUrl: prefix + "/add",
            updateUrl: prefix + "/edit/{id}",
            removeUrl: prefix + "/remove",
            exportUrl: prefix + "/export",
            modalName: "消毒记录",
            showExport: false,
            showSearch: false,
            showRefresh: false,
            showColumns: false,
            showToggle: false,
            columns: [
                {
                    field: 'xdId',
                    title: '消毒主键',
                    visible: false
                },{
                    title: '序号',
                    formatter: function (value, row, index) {
                        return $.table.serialNumber(index);
                    }
                },
                {
                    field: 'xdPlace',
                    title: '消毒位置',
                    sortable: true
                },
                {
                    field: 'xdType',
                    title: '消毒方式',
                    sortable: true,
                    formatter: function (value, row, index) {
                        if (1 == value) {
                            return "预防消毒"
                        }
                        if (2 == value) {
                            return "临时消毒"
                        }
                        if (3 == value) {
                            return "终止消毒"
                        }
                        return "--";

                    }
                },
                {
                    field: 'xdInfo',
                    title: '消毒内容',
                    sortable: true
                },
                /*{
                    field : 'xdUser',
                    title : '消毒人id',
                    sortable: true
                },*/
                {
                    field: 'xdUsername',
                    title: '消毒人',
                    sortable: true
                },
                /*{
                    field : 'xdDeptname',
                    title : '部门',
                    sortable: false
                },*/
                {
                    field: 'xdDeptname',
                    title: '班组',
                    sortable: true
                },
                {
                    field: 'xdTime',
                    title: '消毒时间',
                    sortable: true,
                    formatter: function (value, row, index) {
                        return dateFtt(value);
                    }

                },
                /*{
                    field : 'createTime',
                    title : '创建时间',
                    sortable: true
                },
                {
                    field : 'createBy',
                    title : '创建者',
                    sortable: true
                },*/
                {
                    field: 'remark',
                    title: '备注',
                    formatter: function (value, row, index) {
                        return $.table.tooltip(value);
                    }
                }]
        };
        $.table.init(options);
    });
    setTitle("消毒管理",false)
</script>
</body>
</html>